{extend name="public:base" /}
{block name="theme"}渠道统计管理{/block}
{block name="small_theme"}预产期统计{/block}
{block name="breadcrumb"}
<li><a href="{:url('index')}">渠道统计</a></li>
<li class="active">预产期统计</li>
{/block}
{block name="content"}
<link rel="stylesheet" href="__CSS__/indexcommon.css">
<link rel="stylesheet" href="//cdn.bootcss.com/bootstrap-datetimepicker/4.17.47/css/bootstrap-datetimepicker.min.css">

<style>
    .table-bordered>thead>tr>th, .table-bordered>tbody>tr>th, .table-bordered>tfoot>tr>th, .table-bordered>thead>tr>td, .table-bordered>tbody>tr>td, .table-bordered>tfoot>tr>td{
        border-bottom: none;
    }
</style>

<section class="content" style="min-height: 60px;font-size: 14px;">
    <form method="post" action="{:url('ycqtj')}" >
        <div class="box_">
            <div class="box_left row">
                <div class='col-sm-3'>
                    <label>建单时间</label>
                    <input type='text' class="form-control" name="jdtime" id='datetimepicker4' placeholder="建单月份" value="{$times.jdtime}" />
                </div>
                <div class="col-sm-8">
                    <label>预产期</label>
                    <input type='text' class="form-control" name="ycstart" id='datetimepicker1' style="width: 30%" placeholder="预产期开始月份" value="{$times.ycstart}" />
                    <span>-</span>
                    <input type='text' class="form-control" name="ycend" id='datetimepicker2' style="width: 30%" placeholder="预产期结束月份" value="{$times.ycend}" />
                </div>
            </div>
            <div class="box_right">
                <button class="btn btn-primary">开始查询</button>
            </div>
        </div>
    </form>
</section>
<div class="row" style="padding:15px;">
    <div class="col-xs-12">
        <div class="box box-list">
            <div class="box-header" data-original-title="" style="height: 40px;">合计：{$data.count}</div>
            <!-- /.box-header -->
            <div class="box-body table-responsive no-padding" style="border-bottom: 1px solid #dfdfdf;overflow: hidden;">
                <table class="table table-striped table-bordered table-condensed table-hover">
                    <thead >
                        <tr>
                            <!--<th>地区</th>-->
                            <th>医院</th>
                            {volist name='months' id='vo'}
                                <th >{$vo.month}</th>
                            {/volist}
                        </tr>
                    </thead>
                    <tbody>
                        {foreach name='data.detail' item='vo'}
                            <tr>
                                <!--<td rowspan="3">渝中</td>-->
                                <td style="width: 15%"><span class="tanchu" data-toggle="tooltip" data-placement="top" title="{$vo.yiyuan_name}">{$vo.yiyuan_name}</span></td>
                                {volist name='vo.num' id='v'}
                                    <td>{$v}</td>
                                {/volist}
                            </tr>
                        {/foreach}

                        <!--<tr>-->
                            <!--<td>医院1</td>-->
                            <!--<td>{$v.id}</td>-->
                            <!--<td>{$v.id}</td>-->
                            <!--<td>{$v.id}</td>-->
                            <!--<td>{$v.id}</td>-->
                        <!--</tr>-->

                    </tbody>
                </table>

            </div>
        </div>
        <!-- /.box -->
    </div>
</div>
{/block}
{block name="js"}
<script src="//cdn.bootcss.com/moment.js/2.18.1/locale/zh-cn.js"></script>
<script type="text/javascript" src="//cdn.bootcss.com/bootstrap-datetimepicker/4.17.47/js/bootstrap-datetimepicker.min.js"></script>
<script type="text/javascript">
    $(function () {
        $('#datetimepicker4').datetimepicker({
            format: 'YYYY-MM',
        });
        $('#datetimepicker1').datetimepicker({
            format: 'YYYY-MM',
        });
        $('#datetimepicker2').datetimepicker({
            format: 'YYYY-MM',
            useCurrent: false,
        });
        $("#datetimepicker1").on("dp.change", function (e) {
            $('#datetimepicker2').data("DateTimePicker").minDate(e.date);
        });
        $("#datetimepicker2").on("dp.change", function (e) {
            $('#datetimepicker1').data("DateTimePicker").maxDate(e.date);
        });
    });
</script>

<script type="text/javascript">
    function opendel(url){
        layer.confirm('确定删除？', {
            skin: 'layui-layer-lan', //样式类名
            btn: ['真的','假的'] //按钮
        }, function(){
            $.post(url,complete2);
        }, function(){
            layer.msg('下次不要这么调皮了', {
                icon: 2,
            });
        });
    }
    function opengroup(url){
        layer.open({
            type: 2,
            anim:6,
            title: '用户组授权',
            skin: 'layui-layer-lan', //样式类名
            shadeClose: true,
            shade: 0.8,
            area: ['50%', '80%'],
            content: url,
            end:function(){
                history.go(0);
            }
        });
    }

    function setstates(url){
        layer.open({
            type: 2,
            anim:6,
            title: '设置状态',
            skin: 'layui-layer-lan', //样式类名
            shadeClose: true,
            shade: 0.8,
            area: ['50%', '80%'],
            content: url,
            end:function(){

            }
        });
    }
    highlight_subnav("{:url('index')}");
</script>
{/block}